<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "job_type".
 *
 * @property int    $id
 * @property string $name 种类名称
 * @property string $value 值
 * @property int    $type 类型
 */
class JobType extends \yii\db\ActiveRecord
{

    const TYPE_JOB = 1;
    const TYPE_MISSION = 2;

    const TYPE_LOCATION = 3;
    const TYPE_SALARY = 4;
    const TYPE_TIME = 5;


    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'job_type';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['name', 'type'], 'required'],
            [['type'], 'integer'],
            [['name', 'value'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id'    => 'ID',
            'name'  => '种类名称',
            'type'  => '类型',
            'value' => '值',
        ];
    }
}
